<?php
namespace app\admin\logic;

use think\facade\View;

class BaseLogic
{
    //添加首页轮播数据
    public static function addAdvAttr($param)
    {
        $data = [
            'name'      =>$param['name'],
            'add_time'  =>time(),
            'sort'      =>$param['sort'],
            'if_show'   =>$param['if_show'],
        ];
        return $data;
    }
    //修改首页轮播数据
    public static function editAdvAttr($post)
    {
        $data = [
            'banner_id' =>$post['banner_id'],
            'name'      =>$post['name'],
            'sort'      =>$post['sort'],
            'if_show'   =>$post['if_show'],
        ];
        return $data;
    }

}